home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / perl5 / File::DosGlob.z / File::DosGlob
Encoding:
Text File  |  2002-10-03  |  3.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. FFFFiiiilllleeee::::::::DDDDoooossssGGGGlllloooobbbb((((3333))))                                              FFFFiiiilllleeee::::::::DDDDoooossssGGGGlllloooobbbb((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      File::DosGlob - DOS like globbing and then some
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          require 5.004;
  13.  
  14.          # override CORE::glob in current package
  15.          use File::DosGlob 'glob';
  16.  
  17.          # override CORE::glob in ALL packages (use with extreme caution!)
  18.          use File::DosGlob 'GLOBAL_glob';
  19.  
  20.          @perlfiles = glob  "..\\pe?l/*.p?";
  21.          print <..\\pe?l/*.p?>;
  22.  
  23.          # from the command line (overrides only in main::)
  24.          > perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"
  25.  
  26.  
  27. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  28.      A module that implements DOS-like globbing with a few enhancements.  It
  29.      is largely compatible with perlglob.exe (the M$ setargv.obj version) in
  30.      all but one respect--it understands wildcards in directory components.
  31.  
  32.      For example, <..\\l*b\\file/*glob.p?> will work as expected (in that it
  33.      will find something like '..\lib\File/DosGlob.pm' alright).  Note that
  34.      all path components are case-insensitive, and that backslashes and
  35.      forward slashes are both accepted, and preserved.  You may have to double
  36.      the backslashes if you are putting them in literally, due to double-
  37.      quotish parsing of the pattern by perl.
  38.  
  39.      Spaces in the argument delimit distinct patterns, so glob('*.exe *.dll')
  40.      globs all filenames that end in .exe or .dll.  If you want to put in
  41.      literal spaces in the glob pattern, you can escape them with either
  42.      double quotes, or backslashes.  e.g. glob('c:/"Program Files"/*/*.dll'),
  43.      or glob('c:/Program\ Files/*/*.dll').  The argument is tokenized using
  44.      Text::ParseWords::parse_line(), so see the _T_e_x_t::_P_a_r_s_e_W_o_r_d_s manpage for
  45.      details of the quoting rules used.
  46.  
  47.      Extending it to csh patterns is left as an exercise to the reader.
  48.  
  49. EEEEXXXXPPPPOOOORRRRTTTTSSSS ((((bbbbyyyy rrrreeeeqqqquuuueeeesssstttt oooonnnnllllyyyy))))
  50.      _g_l_o_b()
  51.  
  52. BBBBUUUUGGGGSSSS
  53.      Should probably be built into the core, and needs to stop pandering to
  54.      DOS habits.  Needs a dose of optimizium too.
  55.  
  56. AAAAUUUUTTTTHHHHOOOORRRR
  57.      Gurusamy Sarathy <gsar@umich.edu>
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FFFFiiiilllleeee::::::::DDDDoooossssGGGGlllloooobbbb((((3333))))                                              FFFFiiiilllleeee::::::::DDDDoooossssGGGGlllloooobbbb((((3333))))
  71.  
  72.  
  73.  
  74. HHHHIIIISSSSTTTTOOOORRRRYYYY
  75.      +o   Support for globally overriding _g_l_o_b() (GSAR 3-JUN-98)
  76.  
  77.      +o   Scalar context, independent iterator context fixes (GSAR 15-SEP-97)
  78.  
  79.      +o   A few dir-vs-file optimizations result in glob importation being 10
  80.          times faster than using perlglob.exe, and using perlglob.bat is only
  81.          twice as slow as perlglob.exe (GSAR 28-MAY-97)
  82.  
  83.      +o   Several cleanups prompted by lack of compatible perlglob.exe under
  84.          Borland (GSAR 27-MAY-97)
  85.  
  86.      +o   Initial version (GSAR 20-FEB-97)
  87.  
  88. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.      perl
  90.  
  91.      perlglob.bat
  92.  
  93.      Text::ParseWords
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.